3.452 \(\int (a+b \sec ^3(e+f x)) \tan ^5(e+f x) \, dx\)

Optimal. Leaf size=92 \[ \frac {a \sec ^4(e+f x)}{4 f}-\frac {a \sec ^2(e+f x)}{f}-\frac {a \log (\cos (e+f x))}{f}+\frac {b \sec ^7(e+f x)}{7 f}-\frac {2 b \sec ^5(e+f x)}{5 f}+\frac {b \sec ^3(e+f x)}{3 f} \]

[Out]

-a*ln(cos(f*x+e))/f-a*sec(f*x+e)^2/f+1/3*b*sec(f*x+e)^3/f+1/4*a*sec(f*x+e)^4/f-2/5*b*sec(f*x+e)^5/f+1/7*b*sec(
f*x+e)^7/f

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4138, 1802} \[ \frac {a \sec ^4(e+f x)}{4 f}-\frac {a \sec ^2(e+f x)}{f}-\frac {a \log (\cos (e+f x))}{f}+\frac {b \sec ^7(e+f x)}{7 f}-\frac {2 b \sec ^5(e+f x)}{5 f}+\frac {b \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^3)*Tan[e + f*x]^5,x]

[Out]

-((a*Log[Cos[e + f*x]])/f) - (a*Sec[e + f*x]^2)/f + (b*Sec[e + f*x]^3)/(3*f) + (a*Sec[e + f*x]^4)/(4*f) - (2*b
*Sec[e + f*x]^5)/(5*f) + (b*Sec[e + f*x]^7)/(7*f)

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rubi steps

\begin {align*} \int \left (a+b \sec ^3(e+f x)\right ) \tan ^5(e+f x) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {\left (1-x^2\right )^2 \left (b+a x^3\right )}{x^8} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {b}{x^8}-\frac {2 b}{x^6}+\frac {a}{x^5}+\frac {b}{x^4}-\frac {2 a}{x^3}+\frac {a}{x}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {a \log (\cos (e+f x))}{f}-\frac {a \sec ^2(e+f x)}{f}+\frac {b \sec ^3(e+f x)}{3 f}+\frac {a \sec ^4(e+f x)}{4 f}-\frac {2 b \sec ^5(e+f x)}{5 f}+\frac {b \sec ^7(e+f x)}{7 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.26, size = 87, normalized size = 0.95 \[ -\frac {a \left (-\tan ^4(e+f x)+2 \tan ^2(e+f x)+4 \log (\cos (e+f x))\right )}{4 f}+\frac {b \sec ^7(e+f x)}{7 f}-\frac {2 b \sec ^5(e+f x)}{5 f}+\frac {b \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^3)*Tan[e + f*x]^5,x]

[Out]

(b*Sec[e + f*x]^3)/(3*f) - (2*b*Sec[e + f*x]^5)/(5*f) + (b*Sec[e + f*x]^7)/(7*f) - (a*(4*Log[Cos[e + f*x]] + 2
*Tan[e + f*x]^2 - Tan[e + f*x]^4))/(4*f)

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 81, normalized size = 0.88 \[ -\frac {420 \, a \cos \left (f x + e\right )^{7} \log \left (-\cos \left (f x + e\right )\right ) + 420 \, a \cos \left (f x + e\right )^{5} - 140 \, b \cos \left (f x + e\right )^{4} - 105 \, a \cos \left (f x + e\right )^{3} + 168 \, b \cos \left (f x + e\right )^{2} - 60 \, b}{420 \, f \cos \left (f x + e\right )^{7}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^5,x, algorithm="fricas")

[Out]

-1/420*(420*a*cos(f*x + e)^7*log(-cos(f*x + e)) + 420*a*cos(f*x + e)^5 - 140*b*cos(f*x + e)^4 - 105*a*cos(f*x
+ e)^3 + 168*b*cos(f*x + e)^2 - 60*b)/(f*cos(f*x + e)^7)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^5,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*(a/2*ln(abs((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))+1))-a/
2*ln(abs((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))-1))+(1089*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^7*a-8463*
((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^6*a+28749*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^5*a-4480*((1-cos
(f*x+exp(1)))/(1+cos(f*x+exp(1))))^4*b-51555*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^4*a-2240*((1-cos(f*x+ex
p(1)))/(1+cos(f*x+exp(1))))^3*b+51555*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^3*a-1344*((1-cos(f*x+exp(1)))/
(1+cos(f*x+exp(1))))^2*b-28749*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*a+448*(1-cos(f*x+exp(1)))/(1+cos(f*
x+exp(1)))*b+8463*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*a-64*b-1089*a)*1/840/((1-cos(f*x+exp(1)))/(1+cos(f*x
+exp(1)))-1)^7)

________________________________________________________________________________________

maple [B]  time = 1.10, size = 183, normalized size = 1.99 \[ \frac {\left (\tan ^{4}\left (f x +e \right )\right ) a}{4 f}-\frac {a \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}-\frac {a \ln \left (\cos \left (f x +e \right )\right )}{f}+\frac {b \left (\sin ^{6}\left (f x +e \right )\right )}{7 f \cos \left (f x +e \right )^{7}}+\frac {b \left (\sin ^{6}\left (f x +e \right )\right )}{35 f \cos \left (f x +e \right )^{5}}-\frac {b \left (\sin ^{6}\left (f x +e \right )\right )}{105 f \cos \left (f x +e \right )^{3}}+\frac {b \left (\sin ^{6}\left (f x +e \right )\right )}{35 f \cos \left (f x +e \right )}+\frac {8 b \cos \left (f x +e \right )}{105 f}+\frac {b \cos \left (f x +e \right ) \left (\sin ^{4}\left (f x +e \right )\right )}{35 f}+\frac {4 b \cos \left (f x +e \right ) \left (\sin ^{2}\left (f x +e \right )\right )}{105 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^3)*tan(f*x+e)^5,x)

[Out]

1/4/f*tan(f*x+e)^4*a-1/2/f*a*tan(f*x+e)^2-a*ln(cos(f*x+e))/f+1/7/f*b*sin(f*x+e)^6/cos(f*x+e)^7+1/35/f*b*sin(f*
x+e)^6/cos(f*x+e)^5-1/105/f*b*sin(f*x+e)^6/cos(f*x+e)^3+1/35/f*b*sin(f*x+e)^6/cos(f*x+e)+8/105/f*b*cos(f*x+e)+
1/35/f*b*cos(f*x+e)*sin(f*x+e)^4+4/105/f*b*cos(f*x+e)*sin(f*x+e)^2

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 73, normalized size = 0.79 \[ -\frac {420 \, a \log \left (\cos \left (f x + e\right )\right ) + \frac {420 \, a \cos \left (f x + e\right )^{5} - 140 \, b \cos \left (f x + e\right )^{4} - 105 \, a \cos \left (f x + e\right )^{3} + 168 \, b \cos \left (f x + e\right )^{2} - 60 \, b}{\cos \left (f x + e\right )^{7}}}{420 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^5,x, algorithm="maxima")

[Out]

-1/420*(420*a*log(cos(f*x + e)) + (420*a*cos(f*x + e)^5 - 140*b*cos(f*x + e)^4 - 105*a*cos(f*x + e)^3 + 168*b*
cos(f*x + e)^2 - 60*b)/cos(f*x + e)^7)/f

________________________________________________________________________________________

mupad [B]  time = 8.79, size = 227, normalized size = 2.47 \[ \frac {2\,a\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\right )}{f}-\frac {2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-14\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+\left (32\,a+\frac {32\,b}{3}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+\left (\frac {16\,b}{3}-32\,a\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+\left (14\,a+\frac {16\,b}{5}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+\left (-2\,a-\frac {16\,b}{15}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+\frac {16\,b}{105}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{14}-7\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}+21\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-35\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+35\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6-21\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+7\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(e + f*x)^5*(a + b/cos(e + f*x)^3),x)

[Out]

(2*a*atanh(tan(e/2 + (f*x)/2)^2))/f - ((16*b)/105 - tan(e/2 + (f*x)/2)^2*(2*a + (16*b)/15) + tan(e/2 + (f*x)/2
)^4*(14*a + (16*b)/5) - tan(e/2 + (f*x)/2)^6*(32*a - (16*b)/3) + tan(e/2 + (f*x)/2)^8*(32*a + (32*b)/3) - 14*a
*tan(e/2 + (f*x)/2)^10 + 2*a*tan(e/2 + (f*x)/2)^12)/(f*(7*tan(e/2 + (f*x)/2)^2 - 21*tan(e/2 + (f*x)/2)^4 + 35*
tan(e/2 + (f*x)/2)^6 - 35*tan(e/2 + (f*x)/2)^8 + 21*tan(e/2 + (f*x)/2)^10 - 7*tan(e/2 + (f*x)/2)^12 + tan(e/2
+ (f*x)/2)^14 - 1))

________________________________________________________________________________________

sympy [A]  time = 8.41, size = 119, normalized size = 1.29 \[ \begin {cases} \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac {b \tan ^{4}{\left (e + f x \right )} \sec ^{3}{\left (e + f x \right )}}{7 f} - \frac {4 b \tan ^{2}{\left (e + f x \right )} \sec ^{3}{\left (e + f x \right )}}{35 f} + \frac {8 b \sec ^{3}{\left (e + f x \right )}}{105 f} & \text {for}\: f \neq 0 \\x \left (a + b \sec ^{3}{\relax (e )}\right ) \tan ^{5}{\relax (e )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**3)*tan(f*x+e)**5,x)

[Out]

Piecewise((a*log(tan(e + f*x)**2 + 1)/(2*f) + a*tan(e + f*x)**4/(4*f) - a*tan(e + f*x)**2/(2*f) + b*tan(e + f*
x)**4*sec(e + f*x)**3/(7*f) - 4*b*tan(e + f*x)**2*sec(e + f*x)**3/(35*f) + 8*b*sec(e + f*x)**3/(105*f), Ne(f,
0)), (x*(a + b*sec(e)**3)*tan(e)**5, True))

________________________________________________________________________________________